package cn.edu.swust.adressbook.bean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.util.Date;

@Entity
public class CallLog {
    @Id(autoincrement = true)
    private Long id;           //通讯记录Id
    private Date date;         //通话开始时间

    private Integer state;
    /**
     * 通话状态
     * 呼出接通 --> 1
     * 呼出未接 --> 2
     * 呼入未接 --> 3
     * 呼入接通 --> 1
     */


    private Long talkTime;     //通话时长 可能为空 需要根据通话状态判断
    private Integer toOrForm;
    /**
     * 呼入或者呼出
     * 呼入 --> 1
     * 呼出 --> 2
     */
    private String phoneNumber; //联系人电话
    private Long contactId;     //联系人id
    public Long getContactId() {
        return this.contactId;
    }
    public void setContactId(Long contactId) {
        this.contactId = contactId;
    }
    public String getPhoneNumber() {
        return this.phoneNumber;
    }
    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }
    public Integer getToOrForm() {
        return this.toOrForm;
    }
    public void setToOrForm(Integer toOrForm) {
        this.toOrForm = toOrForm;
    }
    public Long getTalkTime() {
        return this.talkTime;
    }
    public void setTalkTime(Long talkTime) {
        this.talkTime = talkTime;
    }
    public Integer getState() {
        return this.state;
    }
    public void setState(Integer state) {
        this.state = state;
    }
    public Date getDate() {
        return this.date;
    }
    public void setDate(Date date) {
        this.date = date;
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    @Generated(hash = 1829200184)
    public CallLog(Long id, Date date, Integer state, Long talkTime,
            Integer toOrForm, String phoneNumber, Long contactId) {
        this.id = id;
        this.date = date;
        this.state = state;
        this.talkTime = talkTime;
        this.toOrForm = toOrForm;
        this.phoneNumber = phoneNumber;
        this.contactId = contactId;
    }
    @Generated(hash = 242590380)
    public CallLog() {
    }

    @Override
    public String toString() {
        return "CallLog{" +
                "id=" + id +
                ", date=" + date +
                ", contactId=" + contactId +
                '}';
    }
}
